#pragma once
#include <iostream>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <string>

using std::cout;
using std::endl;
using std::vector;
using std::string;
using std::cin;

#define FILEPATH "./pipe"
#define FILEMODE 0664

struct mypipe{
    mypipe(){
        int n = mkfifo(FILEPATH, FILEMODE);
        if(n == -1){
            perror("mkfifo");
            exit(1);
        }
    }
    ~mypipe(){
        int n = unlink(FILEPATH);
        if(n == -1){
            perror("unlink");
            exit(2);
        }
    }
};
